﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
namespace Restful_Api.Models
{
    /// <summary>
    /// 接受对外传递的参数模型
    /// </summary>
    public class CompanyAddDto
    {
        [Display(Name="公司名称")]
        [Required(ErrorMessage ="{0}这个字段是必须的")]
        [MaxLength(100)]
        public string Name { get; set; }

        [Display(Name = "公司简介")]
        [MaxLength(500)]
        public string Introduction { get; set; }
        public ICollection<EmployeeAddDto> Employees { get; set; } = new List<EmployeeAddDto>();
    }
}
